home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / DirectDraw / SpriteAnimate / readme.txt < prev    next >
Encoding:
Text File  |  2001-10-10  |  1.4 KB  |  41 lines

  1. //-----------------------------------------------------------------------------
  2. // Sample Name: SpriteAnimate Sample
  3. // 
  4. // Copyright (c) 1999-2001 Microsoft Corporation. All rights reserved.
  5. // 
  6. //-----------------------------------------------------------------------------
  7.  
  8.  
  9. Description
  10. ===========
  11.   SpriteAnimate demonstrates a simple technique to animate DirectDraw surfaces. 
  12.  
  13. Path
  14. ====
  15.   Source: DXSDK\Samples\Multimedia\DDraw\SpriteAnimate
  16.  
  17.   Executable: DXSDK\Samples\Multimedia\DDraw\Bin
  18.  
  19. User's Guide
  20. ============
  21.   SpriteAnimate requires no user input. Press the ESC key to quit the program.
  22.  
  23. Programming Notes
  24. =================
  25.   For details on how to setup a full-screen DirectDraw app, see the FullScreenMode 
  26.   sample. 
  27.   
  28.   One simple method to animate sprites in DirectDraw is author a single bitmap
  29.   file to contain many frames of animation.  The program then stores the current frame 
  30.   indicator in each sprite's state.  From this current frame indicator, it can 
  31.   progmatically derive a src rect that encompasses only a single frame 
  32.   of animation in the off-screen plain surface.  The rect then is blited from the
  33.   off-screen plain surface to the back buffer.  
  34.   
  35.   InitDirectDraw() in the sample shows how to build an cached array of these source rects.
  36.   DisplayFrame() then access this array based on each sprite's current frame.
  37.   
  38.   
  39.  
  40.   
  41.